<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="templateadmin.xhtml">
        <ui:define name="content">
<script type="text/javascript">
              function show_confirm(){
                        var r=confirm("Are your sure Delay Booking!");
                        if (r==true)
                          {
                          alert("This Booking is not available!Amount of money ll refund for customer");
                          }
                        else
                          {
                          alert("Booking is still available");
                          }
                    }
            </script>
            
                <h1>Tour Booking Management</h1>
                <h:form id="tourbooking">
                <center>
                    <table border="0" cellpadding="0" cellspacing="0" id="product-table">
                        <tr>

                            <th class="table-header-repeat line-left minwidth-1" width="70px"><a href="">UserName </a></th>

                            <th class="table-header-repeat line-left minwidth-1" width="150px"><a href="">Package Name</a></th>
                            <th class="table-header-repeat line-left minwidth-1" width="80px"><a href="">Quantity</a></th>
                            <th class="table-header-repeat line-left minwidth-1" width="100px"><a href="">Total Price</a></th>
                            <th class="table-header-repeat line-left minwidth-1" width="80px"><a href="">Available</a></th>
                            <th class="table-header-repeat line-left minwidth-1" width="10px"><a href="">Option</a>	</th>
                        </tr>
                        <ui:repeat value="#{mngTourBookingBean.listTourBookingDetail}" var="ltour">
                            <tr>

                                <td>#{ltour.usernames}</td>                               
                                <td>#{ltour.packagenames}</td>
                                <td>#{ltour.tourBooking.quantity}</td>
                                <td>#{ltour.tourBooking.price}</td>
                                <td>#{ltour.tourBooking.available}
                                </td>
                                <td>
                                    <h:commandButton action="#{mngTourBookingBean.updateStatusBooking(ltour.tourBooking)}"  styleClass="form-delay" onclick="show_confirm()"></h:commandButton>
                                </td>
                            </tr>
                        </ui:repeat>

                    </table>

                    <ui:repeat value="#{mngTourBookingBean.pageIndex}" var="page1">
                        <a href="managertourbooking.xhtml?pageID1=#{page1}">#{page1}</a>
                    </ui:repeat>
                </center>
            </h:form>

        </ui:define>
    </ui:composition>
</html>

